import 'package:flutter/material.dart';
import '../utils/request.dart';

class VideoList extends StatefulWidget {
  VideoList({Key? key}) : super(key: key);

  @override
  _VideoListState createState() => _VideoListState();
}

class _VideoListState extends State<VideoList> {
  void _getCode() async {
    var res = await getHttp('/login/status');
    print("登陆状态$res");
  }

  void _sigin() async {
    var res =
        await getHttp('/login/cellphone?phone=15893301296&password=lyf408866');
    print("执行登陆--$res");
  }

  void _getSiginState() async {
    var res = await getHttp('/login/status');
    print("获取登陆状态$res");
  }

  void _refreSiginState() async {
    var res = await getHttp('/login/refresh');
    print("刷新登陆状态$res");
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(''),
      ),
      body: ListView(
        children: [
          // ElevatedButton(
          //     onPressed: () {
          //       _getCode();
          //     },
          //     child: Text('获取登陆状态')),
          // SizedBox(height: 20),
          // ElevatedButton(
          //     onPressed: () {
          //       _sigin();
          //     },
          //     child: Text('登陆')),
          // SizedBox(height: 20),
          // ElevatedButton(
          //     onPressed: () {
          //       _getSiginState();
          //     },
          //     child: Text('获取登陆状态')),
          // SizedBox(height: 20),
          // ElevatedButton(
          //     onPressed: () {
          //       _refreSiginState();
          //     },
          //     child: Text('刷新登陆状态')),
          // SizedBox(height: 20),
        ],
      ),
    );
  }
}
